home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / gfx / pbm / hpcd2ppm_0_5_pl1.lha / hpcdtoppm.0.5.pl1 / src / config.h.orig < prev    next >
Text File  |  1993-08-20  |  4KB  |  193 lines

  1. /* hpcdtoppm (Hadmut's pcdtoppm) v0.5pl1
  2. *  Copyright (c) 1992, 1993 by Hadmut Danisch (danisch@ira.uka.de).
  3. *  Permission to use and distribute this software and its
  4. *  documentation for noncommercial use and without fee is hereby granted,
  5. *  provided that the above copyright notice appear in all copies and that
  6. *  both that copyright notice and this permission notice appear in
  7. *  supporting documentation. It is not allowed to sell this software in 
  8. *  any way. This software is not public domain.
  9. */
  10.  
  11.  
  12.  
  13. /* define OWN_WRITE either here or by compiler-option if you don't want to use
  14.    the pbmplus-routines for writing */
  15. /* #define OWN_WRITE */
  16.  
  17.  
  18.  
  19. /* define DEBUG for some debugging informations */
  20. /* #define DEBUG */
  21.  
  22.  
  23. /* define LONG_HELP or SHORT_HELP, if you want to have an options
  24.    list if parameters are bad */
  25. #define LONG_HELP
  26.  
  27.  
  28. /* define DO_DECL_EXT for external declaration of system and library calls */
  29. #define DO_DECL_EXT
  30.  
  31.  
  32. /* define FASTHUFF for faster Huffman decoding with tables.
  33. ** this makes a little speedup, but needs about 768 KByte memory
  34. */
  35. #define FASTHUFF
  36.  
  37.  
  38.  
  39. #ifdef OWN_WRITE
  40. /* If the own routines are used, this is the size of the buffer in bytes.
  41.    You can shrink if needed. */
  42. #define own_BUsize 50000
  43.  
  44. /* The header for the ppm-files */
  45. #define PPM_Header "P6\n%d %d\n255\n"
  46. #define PGM_Header "P5\n%d %d\n255\n"
  47.  
  48.  
  49. #endif
  50.  
  51.  
  52.  
  53. /* fopen Parameters, for some systems (MS-DOS :-( ) you need "wb" and "rb" */
  54. #define W_OP "w"
  55. #define R_OP "r"
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65. /* if you can't write to stdout in binary mode, you have to fdopen
  66.    a FILE * in binary mode to stdout. This is important for system,
  67.    where W_OP is something other than "w". Please define the
  68.    Macro USE_FDOPEN in this case and check the instructions, where this
  69.    macro is used.
  70. */
  71.  
  72. /* #define USE_FDOPEN */
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82. /** Error detection **/
  83.  
  84. #define error(x) eerror(x,__FILE__,__LINE__)
  85.  
  86.  
  87.  
  88. /*
  89. ** Data Types
  90. ** Important: sBYTE must be a signed byte type !
  91. ** If your compiler doesn't understand "signed", remove it.
  92. */
  93.  
  94. #ifndef sBYTE
  95. typedef   signed char sBYTE;
  96. #endif
  97.  
  98. typedef unsigned char uBYTE;
  99.  
  100. /* signed and unsigned 32-bit-integers 
  101. sINT and uINT must at least have 32 bit. If you
  102. don't have 32-bit-integers, take 64-bit and
  103. define the macro U_TOO_LONG !!!
  104.  
  105. uINT and sINT must be suitable to the printf/scanf-format %d
  106. and %u and to the systemcalls as fread etc.
  107.  
  108. */
  109.  
  110. #define uINT unsigned int
  111. #define sINT          int
  112. /* #define U_TOO_LONG */
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119. typedef uINT dim;
  120. typedef sINT sdim;
  121.  
  122.  
  123.  
  124.  
  125. /* Floating point data type and string for sscanf */
  126. #define FLTPT double
  127. #define SSFLTPT "%lf"
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. /* Default taken when no size parameter given,
  136. ** C_DEFAULT depends on your taste and video-hardware,
  137. */
  138.  
  139. #define S_DEFAULT S_Base16
  140. #define O_DEFAULT O_PPM
  141. #define C_DEFAULT C_LINEAR
  142. #define T_DEFAULT T_AUTO
  143.  
  144.  
  145. /* Background for contact sheet */
  146. #define CONTLUM neutrLum
  147. #define CONTCH1 neutrCh1
  148. #define CONTCH2 neutrCh2
  149.  
  150.  
  151.  
  152.  
  153. /* Maximum Black value of frame for cutting of the
  154. ** frame. If MAX_BLACK is n, a frame is detected, when
  155. ** all Luma values are within [ 0 .. (n-1) ]
  156. */
  157. #define MAX_BLACK 1
  158.  
  159. /* Default Postscript paper size
  160. ** (German DIN A 4 )
  161. */
  162. #define DEF_PAPER_LEFT    50.0
  163. #define DEF_PAPER_BOTTOM  50.0
  164. #define DEF_PAPER_WIDTH  500.0
  165. #define DEF_PAPER_HEIGHT 750.0
  166. #define DEF_DPI          300.0
  167.  
  168.  
  169.  
  170. /* External Declarations */
  171. #ifdef DO_DECL_EXT
  172.  
  173. extern void *malloc(unsigned);
  174. extern int  sscanf(char *,char *,...);    
  175.  
  176. extern int  fprintf(FILE *,char *,...);
  177. extern int  fclose(FILE *);
  178. extern int  fseek(FILE *,long,int);
  179. extern int  fread(void *,int,int,FILE *);
  180. extern int  fwrite(void *,int,int,FILE *);
  181. extern int  fputs(char *,FILE *);
  182. extern int  fputc(char  ,FILE *);
  183. extern int  fflush(FILE *);
  184.  
  185. #endif
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.